<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var myArray = [10, 20, 30, 40, 50];

// 使用 for 循环遍历数组
for (var i = 0; i < myArray.length; i++) {
    console.log(myArray[i]); // 打印当前元素的值
}
    </script>
</body>
</html>